package com.lan.schedule;

import android.app.Activity;
import android.content.Intent;
import android.graphics.Color;
import android.net.Uri;
import android.os.Build;
import android.os.Bundle;
import android.view.View;
import android.view.Window;
import android.view.WindowManager;
import android.widget.Button;

public class read extends Activity {
    public void wlu(String url){
        Uri uri = Uri.parse(url);
        Intent intent = new Intent(Intent.ACTION_VIEW, uri);
        startActivity(intent);
    }
    String[] str1={"https://www.wolai.com/9M4i5smMQ73hUjoRsxeBYo","https://www.wolai.com/szTNGupzfRttmRTeRwPLfC","https://www.wolai.com/2ArAcZbQoJGwhzaDZtc1fo","https://www.wolai.com/j6HnPpz7TK2L9p1SWuUCof"};
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        getWindow().requestFeature(Window.FEATURE_NO_TITLE);
        if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.LOLLIPOP) {

            Window window = getWindow();

            window.clearFlags(WindowManager.LayoutParams.FLAG_TRANSLUCENT_STATUS

                    | WindowManager.LayoutParams.FLAG_TRANSLUCENT_NAVIGATION);

            window.getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN

                    | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION

                    | View.SYSTEM_UI_FLAG_LAYOUT_STABLE);

            window.addFlags(WindowManager.LayoutParams.FLAG_DRAWS_SYSTEM_BAR_BACKGROUNDS);

            window.setStatusBarColor(Color.TRANSPARENT);

            window.setNavigationBarColor(Color.TRANSPARENT);
        }
        setContentView(R.layout.read);
        getWindow().getDecorView().setSystemUiVisibility(View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN | View.SYSTEM_UI_FLAG_LIGHT_STATUS_BAR);
        Button huawei=findViewById(R.id.huawei);
        huawei.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent(str1[0]);
            }
        });
        Button mi=findViewById(R.id.mi);
        mi.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent(str1[1]);

            }
        });
        Button oppo=findViewById(R.id.oppo);
        oppo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent(str1[2]);

            }
        });
        Button vivo=findViewById(R.id.vivo);
        vivo.setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                intent(str1[3]);
            }
        });
    }
    public void intent (String str){
       wlu(str);
    }
}
